package com.muyu.user.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.muyu.common.core.web.page.PageQueryModel;
import com.muyu.user.domain.model.SysConsumptionRecordQueryModel;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.muyu.user.mapper.SysConsumptionRecordMapper;
import com.muyu.user.domain.SysConsumptionRecord;
import com.muyu.user.domain.model.SysConsumptionRecordPageQueryModel;
import com.muyu.user.service.SysConsumptionRecordService;

/**
 * 消费记录Service业务层处理
 *
 * @author liuguoqiang
 * @date 2025-09-18
 */
@Slf4j
@Service
public class SysConsumptionRecordServiceImpl extends ServiceImpl<SysConsumptionRecordMapper, SysConsumptionRecord>  implements SysConsumptionRecordService {

    /**
     * 查询消费记录列表
     *
     * @param pageQueryModel 消费记录
     * @return 消费记录
     */
    @Override
    public PageQueryModel<SysConsumptionRecordPageQueryModel> pageQuery(SysConsumptionRecordQueryModel pageQueryModel) {
        LambdaQueryWrapper<SysConsumptionRecord> queryWrapper = new LambdaQueryWrapper<>();
          Page<SysConsumptionRecord> page = this.page(pageQueryModel.buildPage(), queryWrapper);
        return PageQueryModel.of(page).cover(SysConsumptionRecordPageQueryModel::infoBuild);
    }

}
